package com.zxx.pattern.observerPattern.observer2;

import java.util.Observable;

/**
 * 被观察者报社类
 * JAVA内置的被观察者Observable类
 *
 * @author zxx on 2021/3/9
 */
public class NewsOffice extends Observable {

    public void setNews(String news){
        System.out.println();
        super.setChanged();
        super.notifyObservers(news);
    }

}
